<template>
  <el-menu router mode="horizontal" :default-active="$route.matched[1].path">
    <el-menu-item
      v-for="route in menus"
      :key="route.meta.id.toString()"
      :index="route.path"
      v-text="route.meta.title"
    />
  </el-menu>
</template>

<script>
import store from '@/store'

export default {
  data: function() {
    return {
      activeUri: null
    }
  },
  computed: {
    menus() {
      return store.getters.menus
    }
  }
}
</script>

<style lang="scss" scoped>
.el-menu.el-menu--horizontal {
  border: none;
}
.el-menu--horizontal > .el-menu-item {
  height: 50px;
  line-height: 50px;
}
</style>
